#include <iostream>

template <class T1, class T2>
class Person
{
    friend void showPerson(Person<T1, T2> p)
    {
        std::cout << "name:" << p.name << " age:" << p.age << std::endl;
    }

public:
    Person(T1 name, T2 age)
    {
        this->name = name;
        this->age = age;
    }
private:
    T1 name;
    T2 age;
};

void test01()
{
    Person<std::string, int> p1("张三", 18);
    showPerson(p1);
}

int main()
{
    test01();
    return 0;
}